<{include file="admin/head.html"}>
<link rel="stylesheet" href="<{$smarty.const.__URL__}>plugins/tablecloth/tablecloth.css">
<body>
	<{include file="admin/nav.html"}>
	<div id="content">
		<div id="sidebar">
			<ul>
				<li><a href="product.php?do=product">查看产品</a></li>
				<li><a href="product.php?do=addPro">添加产品</a></li>
			</ul>
		</div>
		<div id="main">
			<h2 id="page_title">产品列表</h2>
				<{if $list}>
				<table>
					<tr>
						<th>名称</th>
						<th>排序</th>
						<th>价格</th>
						<th>购买链接</th>
						<th>购买人数</th>
						<th>配方</th>
						<th>适用人群</th>
						<th>使用时间</th>
						<th>图片</th>
						<th>操作</th>
					</tr>
					<{foreach from=$list item=l}>
					<tr>
						<td><{$l.name}></td>
						<td><{$l.order}></td>
						<td><{$l.price}></td>
						<td><a href="<{$l.buy_link}>" target="_blank">查看</a></td>
						<td><{$l.buy_nums}></td>
						<td><{$l.material}></td>
						<td><{$l.applicable}></td>
						<td><{$l.usetime}></td>
						<td>
							<{foreach from=$l.piclist item=p}>
								<ul>
									<li><a href="<{$smarty.const.UPLOAD_URL}>product/<{$p.file}>" class="hasLightbox">查看</a></li>
								</ul>
							<{/foreach}>
						</td>
						<td>
							<a href="<{$smarty.const.__URL__}>product.php?id=<{$l.id}>" target="_blank">查看</a>
							<a href="product.php?do=editPro&id=<{$l.id}>">修改</a>
							<a href="javascript:;" class="ln_del" data="{'url':'product.php?do=delPro&id=<{$l.id}>','to':'product.php?do=product'}">删除</a>
							<a href="comment.php?do=addCom&pid=<{$l.id}>">添加评论</a>
						</td>
					</tr>
					<{/foreach}>
				</table>
				<{else}>
					<div class="no_data">暂无数据</div>
				<{/if}>
				<!-- <p><a href="product.php?do=buildHtml">生成静态</a></p> -->
		</div>
	</div>
	<script type="text/javascript" src="<{$smarty.const.__URL__}>plugins/tablecloth/tablecloth.js"></script>
	<{include file="admin/hasLightbox.html"}>
</body>
</html>